package core.rpt.model;

import java.math.BigDecimal;

public class DailySales implements Comparable<DailySales> {
	private String date;
	private int shopId;
	private String attributeId;
	private String shopName;

	private BigDecimal totalSellPrice = new BigDecimal(0);
	private BigDecimal totalRealIncomeFreight = new BigDecimal(0);
	private BigDecimal lyTotalSellPrice = new BigDecimal(0);
	private BigDecimal lyTotalRealIncomeFreight = new BigDecimal(0);
	private Long totalPieces = 0L;
	private BigDecimal totalCostPrice = new BigDecimal(0);
	private BigDecimal amount = new BigDecimal(0);
	private BigDecimal grossPer = new BigDecimal(0);
	private BigDecimal grossRevenue = new BigDecimal(0);
	private Long views = 0L;
	private BigDecimal guests = new BigDecimal(0);
	private BigDecimal successRate = new BigDecimal(0);
	private BigDecimal itemPerTx = new BigDecimal(0);
	private BigDecimal avgCost = new BigDecimal(0);
	
	public String getDate() {
		return date;
	}

	public void setDate(String date) {
		this.date = date;
	}

	public String getAttributeId() {
		return attributeId;
	}

	public void setAttributeId(String attributeId) {
		this.attributeId = attributeId;
	}

	public int getShopId() {
		return shopId;
	}

	public void setShopId(int shopId) {
		this.shopId = shopId;
	}

	public String getShopName() {
		return shopName;
	}

	public void setShopName(String shopName) {
		this.shopName = shopName;
	}

	public BigDecimal getTotalSellPrice() {
		return totalSellPrice;
	}

	public void setTotalSellPrice(BigDecimal totalSellPrice) {
		this.totalSellPrice = totalSellPrice;
	}

	public BigDecimal getTotalRealIncomeFreight() {
		return totalRealIncomeFreight;
	}

	public void setTotalRealIncomeFreight(BigDecimal totalRealIncomeFreight) {
		this.totalRealIncomeFreight = totalRealIncomeFreight;
	}

	public Long getTotalPieces() {
		return totalPieces;
	}

	public void setTotalPieces(Long totalPieces) {
		this.totalPieces = totalPieces;
	}

	public BigDecimal getTotalCostPrice() {
		return totalCostPrice;
	}

	public void setTotalCostPrice(BigDecimal totalCostPrice) {
		this.totalCostPrice = totalCostPrice;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public BigDecimal getGrossPer() {
		return grossPer;
	}

	public void setGrossPer(BigDecimal grossPer) {
		this.grossPer = grossPer;
	}

	public BigDecimal getGrossRevenue() {
		return grossRevenue;
	}

	public void setGrossRevenue(BigDecimal grossRevenue) {
		this.grossRevenue = grossRevenue;
	}

	public Long getViews() {
		return views;
	}

	public void setViews(Long views) {
		this.views = views;
	}

	public BigDecimal getGuests() {
		return guests;
	}

	public void setGuests(BigDecimal guests) {
		this.guests = guests;
	}

	public BigDecimal getSuccessRate() {
		return successRate;
	}

	public void setSuccessRate(BigDecimal successRate) {
		this.successRate = successRate;
	}

	public BigDecimal getItemPerTx() {
		return itemPerTx;
	}

	public void setItemPerTx(BigDecimal itemPerTx) {
		this.itemPerTx = itemPerTx;
	}

	public BigDecimal getAvgCost() {
		return avgCost;
	}

	public void setAvgCost(BigDecimal avgCost) {
		this.avgCost = avgCost;
	}

	public BigDecimal getLyTotalSellPrice() {
		return lyTotalSellPrice;
	}

	public void setLyTotalSellPrice(BigDecimal lyTotalSellPrice) {
		this.lyTotalSellPrice = lyTotalSellPrice;
	}

	public BigDecimal getLyTotalRealIncomeFreight() {
		return lyTotalRealIncomeFreight;
	}

	public void setLyTotalRealIncomeFreight(BigDecimal lyTotalRealIncomeFreight) {
		this.lyTotalRealIncomeFreight = lyTotalRealIncomeFreight;
	}

	@Override
	public int compareTo(DailySales o) {
		if (o == null) {
			return -1;
		}
		int i = this.getShopId() - o.getShopId();
		if (i == 0) {
			return -this.getDate().compareTo(o.getDate());
		}
		return i;
	}
}
